var _util = require('util/util.js');

var _account_servcie = {
    // 模仿Promise写法
    checkLogin : function(resolve, reject) {
        _util.request({
            url     : _util.getServerURL('account/isLogin'),
            method  : 'POST',
            success : resolve,
            error   : reject
        });
    },

    login : function(account, resolve, reject) {
        _util.request({
            url     : _util.getServerURL('account/login'),
            method  : 'POST',
            data    : account,
            success : resolve,
            error   : reject
        });
    }
}

module.exports = _account_servcie;